// cQPMigrationSheet.cpp : implementation file
//

#include "stdafx.h"
#include "QPMig.h"
#include "cQPMigrationSheet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern cControl stControl;
/////////////////////////////////////////////////////////////////////////////
// cQPMigrationSheet

IMPLEMENT_DYNAMIC(cQPMigrationSheet, CPropertySheetEx)

cQPMigrationSheet::cQPMigrationSheet(UINT nIDCaption, CWnd* pParentWnd,
	UINT iSelectPage, HBITMAP hbmWatermark, HPALETTE hpalWatermark,
	HBITMAP hbmHeader)
	:CPropertySheetEx(nIDCaption, pParentWnd, iSelectPage,
				  hbmWatermark, hpalWatermark, hbmHeader)
{
	m_pWelcomePage= new cWelcomePage;
	m_pSharePointSettingsPage=new cSharePointSettingsPage;
	m_pQPSelectCalendarsPage=new cQPSelectCalendarsPage;
	m_pQPSelectDocumentLibrariesPage=new cQPSelectDocumentLibrariesPage;
	m_pFinalPage=new cFinalPage;;
	m_pQPServerAndDataBasePage=new cQPServerAndDataBasePage ;
	m_pQPSettingsPage=new cQPSettingsPage;
	//m_pQPUsersPage=new cQPUsersPage ;
	m_pQPSelectDiscussionsPage= new cQPSelectDiscussionsPage;
	m_pQPSelectSubroomsPage= new cQPSelectSubroomsPage ;

	AddPage(m_pWelcomePage);
	AddPage(m_pSharePointSettingsPage);
	AddPage(m_pQPSettingsPage);
	AddPage(m_pQPServerAndDataBasePage);
	AddPage(m_pQPSelectDocumentLibrariesPage);
	AddPage(m_pQPSelectDiscussionsPage);
	AddPage(m_pQPSelectCalendarsPage);
	//AddPage(m_pQPUsersPage);
	AddPage(m_pQPSelectSubroomsPage);
	AddPage(m_pFinalPage);
		// set the WIZARD97 flag so we'll get the new look
	m_psh.dwFlags |= PSH_WIZARD97;

}

cQPMigrationSheet::cQPMigrationSheet(LPCTSTR pszCaption, CWnd* pParentWnd,
	UINT iSelectPage, HBITMAP hbmWatermark, HPALETTE hpalWatermark,
	HBITMAP hbmHeader)
: CPropertySheetEx(pszCaption, pParentWnd, iSelectPage,
					  hbmWatermark, hpalWatermark, hbmHeader)
{

	m_pWelcomePage= new cWelcomePage;
	m_pSharePointSettingsPage=new cSharePointSettingsPage;
	m_pQPSelectCalendarsPage=new cQPSelectCalendarsPage;
	m_pQPSelectDocumentLibrariesPage=new cQPSelectDocumentLibrariesPage;
	m_pFinalPage=new cFinalPage;;
	m_pQPServerAndDataBasePage=new cQPServerAndDataBasePage ;
	m_pQPSettingsPage=new cQPSettingsPage;
	//m_pQPUsersPage=new cQPUsersPage ;
	m_pQPSelectDiscussionsPage= new cQPSelectDiscussionsPage;
	m_pQPSelectSubroomsPage= new cQPSelectSubroomsPage ;

	AddPage(m_pWelcomePage);
	AddPage(m_pSharePointSettingsPage);
	AddPage(m_pQPSettingsPage);
	AddPage(m_pQPServerAndDataBasePage);
	AddPage(m_pQPSelectDocumentLibrariesPage);
	AddPage(m_pQPSelectDiscussionsPage);
	AddPage(m_pQPSelectCalendarsPage);
	//AddPage(m_pQPUsersPage);
	AddPage(m_pQPSelectSubroomsPage);
	//AddPage(m_pCreateSTSItemsPage);
	AddPage(m_pFinalPage);
		// set the WIZARD97 flag so we'll get the new look
	m_psh.dwFlags |= PSH_WIZARD97;

	}

cQPMigrationSheet::~cQPMigrationSheet()
{
}


BEGIN_MESSAGE_MAP(cQPMigrationSheet, CPropertySheetEx)
	//{{AFX_MSG_MAP(cQPMigrationSheet)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()




void cQPMigrationSheet::CleanUp()
{
	if(m_pWelcomePage)
		delete m_pWelcomePage;
	if(m_pQPSettingsPage)
		delete m_pQPSettingsPage;
	if(m_pQPServerAndDataBasePage)
		delete m_pQPServerAndDataBasePage;
	if(m_pQPSelectDocumentLibrariesPage)
		delete m_pQPSelectDocumentLibrariesPage;
	if(m_pQPSelectDiscussionsPage)
		delete m_pQPSelectDiscussionsPage;
	if(m_pQPSelectCalendarsPage)
		delete m_pQPSelectCalendarsPage;
	//if(m_pQPUsersPage)
	//	delete m_pQPUsersPage;
	if(m_pFinalPage)
		delete m_pFinalPage;
	if(m_pSharePointSettingsPage)
		delete m_pSharePointSettingsPage;
	if(m_pQPSelectSubroomsPage)
		delete m_pQPSelectSubroomsPage;

}
